<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
    <style>
        /* .container{
            width: 300px;
            height: 300px;
            display: flex;
            background-color:red;
        } */

        body{
            height: 100%;
        }

        .container{
            display: flex;
            height: 100%;
        }

        .left{
            width: 300px;
            height: 100%;
            background-color: red;
        }

        .right{
            width: 300px;
            height: 100%;
            background-color: red;
        }

        .middle{
            flex:1;
            height: 100%;
            background-color:blue;
        }
    </style>
<body>
    <div class="container">
        <div class="left">1</div>
        <div class="middle">2</div>
        <div class="right">3</div> 
    </div>
</body>
</html>